﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OpenCommunityProfilesInFieldOfActivitiesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenCommunity.OpenCommunityProfilesInFieldOfActivitiesAdmin" %>
<owc:OwGrid ID="CommunityProfilesInFieldOfActivitiesGrid" runat="server" AutoGenerateColumns="False"
    SkinID="OwGridAdmin" CellSpacing="0" 
    DataSourceID="CommunityProfilesInFieldOfActivitiesOds" GridLines="None" 
    OwEnableMessageDisplay="True" OwMessageDisplayControl="" 
    OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="CommunityProfilesInFieldOfActivitiesOds" DataKeyNames="CommunityProfilesInFieldOfActivitiesID">
       <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="CommunityProfilesInFieldOfActivitiesID" DataType="System.Int64"
                FilterControlAltText="Filter CommunityProfilesInFieldOfActivitiesID column" HeaderText="<%$OwR:Code %>"
                SortExpression="CommunityProfilesInFieldOfActivitiesID" UniqueName="CommunityProfilesInFieldOfActivitiesID">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$ OwR:CommunityProfileDetail %>">
                <ItemTemplate>
                    <%#OwOpenCommunityProfileDetailsBLL.OwGetEntity((long?)Eval("CommunityProfileDetailID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$ OwR:CommunityFieldOfActivity %>">
                <ItemTemplate>
                    <%#OwCommunityFieldOfActivitiesBLL.OwGetEntity((long?)Eval("CommunityFieldOfActivityID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$ OwR:IsDeleted %>">
                <ItemTemplate>
                    <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%#Eval("IsDeleted")%>'
                        AutoPostBack="true" Text='<%#Eval("CommunityProfilesInFieldOfActivitiesID")%>' CssClass="HiddenText"
                        OnCheckedChanged="IsDeletedCb_CheckedChanged" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
           <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:Option %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton ID="Editbt" CommandName="Edit" runat="server" ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif" />
                    &nbsp; &nbsp;
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            <FormTemplate>
                <fieldset>
                    <legend>
                        <owc:OwR runat="server" OwText="InfoLabel" /></legend>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="CommunityProfileDetail" />
                            </td>
                            <td>
                                <owc:OwObjectDataSource ID="OpenCommunityProfileDetailsOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenCommunityProfileDetailsEntity"
                                    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenCommunityProfileDetailsBLL"
                                    UpdateMethod="OwUpdate">
                                    <SelectParameters>
                                        <asp:Parameter Name="isHomeDisplay" Type="Boolean" />
                                        <asp:Parameter Name="isHot" Type="Boolean" />
                                        <asp:Parameter Name="enableBegin" Type="DateTime" />
                                        <asp:Parameter Name="enableEnd" Type="DateTime" />
                                        <asp:Parameter Name="homeDisplayBegin" Type="DateTime" />
                                        <asp:Parameter Name="homeDisplayEnd" Type="DateTime" />
                                        <asp:Parameter Name="hotDisplayBegin" Type="DateTime" />
                                        <asp:Parameter Name="hotDisplayEnd" Type="DateTime" />
                                        <asp:Parameter Name="isApproved" Type="Boolean" />
                                        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
                                        <asp:Parameter DbType="Guid" Name="creatingUser" />
                                        <asp:Parameter DbType="Guid" Name="editingUser" />
                                        <asp:Parameter DbType="Guid" Name="deletingUser" />
                                        <asp:Parameter Name="continentID" Type="Int64" />
                                        <asp:Parameter Name="countryID" Type="Int64" />
                                        <asp:Parameter Name="provinceID" Type="Int64" />
                                        <asp:Parameter Name="districtID" Type="Int64" />
                                        <asp:Parameter Name="wardID" Type="Int64" />
                                        <asp:Parameter Name="languageCode" Type="String" />
                                        <asp:Parameter Name="isEnabled" Type="Boolean" />
                                        <asp:Parameter Name="openCommunityProfileID" Type="Int64" />
                                        <asp:Parameter Name="sortClause" Type="String" />
                                        <asp:Parameter Name="sortDirection" Type="String" />
                                        <asp:Parameter Name="startRowIndex" Type="Int32" />
                                        <asp:Parameter Name="maximumRows" Type="Int32" />
                                    </SelectParameters>
                                </owc:OwObjectDataSource>
                                <owc:OwComboBox ID="CommunityProfileDetailsCbb" runat="server" DataSourceID="OpenCommunityProfileDetailsOds"
                                    SkinID="OwComboBox" EmptyMessage="<%$OwR:CommunityProfileDetailsSelect %>" SelectedValue='<%# Bind("CommunityProfileDetailID") %>'
                                    DataTextField="Name" DataValueField="OpenCommunityProfileDetailID">
                                </owc:OwComboBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<%$OwR:CommunityFieldOfActivitiesSelect %>"
                                    ControlToValidate="CommunityProfileDetailsCbb" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="CommunityFieldOfActivities" />
                            </td>
                            <td>
                                <owc:OwObjectDataSource ID="CommunityFieldOfActivitiesOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwCommunityFieldOfActivitiesEntity"
                                    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwCommunityFieldOfActivitiesBLL"
                                    UpdateMethod="OwUpdate">
                                    <SelectParameters>
                                        <asp:Parameter Name="parentID" Type="Int64" />
                                        <asp:Parameter Name="code" Type="String" />
                                        <asp:Parameter Name="isHomeDisplay" Type="Boolean" />
                                        <asp:Parameter Name="isHot" Type="Boolean" />
                                        <asp:Parameter Name="enableBegin" Type="DateTime" />
                                        <asp:Parameter Name="enableEnd" Type="DateTime" />
                                        <asp:Parameter Name="homeDisplayBegin" Type="DateTime" />
                                        <asp:Parameter Name="homeDisplayEnd" Type="DateTime" />
                                        <asp:Parameter Name="hotDisplayBegin" Type="DateTime" />
                                        <asp:Parameter Name="hotDisplayEnd" Type="DateTime" />
                                        <asp:Parameter Name="isApproved" Type="Boolean" />
                                        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
                                        <asp:Parameter DbType="Guid" Name="creatingUser" />
                                        <asp:Parameter DbType="Guid" Name="editingUser" />
                                        <asp:Parameter DbType="Guid" Name="deletingUser" />
                                        <asp:Parameter Name="languageCode" Type="String" />
                                        <asp:Parameter Name="isEnabled" Type="Boolean" />
                                        <asp:Parameter Name="sortClause" Type="String" />
                                        <asp:Parameter Name="sortDirection" Type="String" />
                                        <asp:Parameter Name="startRowIndex" Type="Int32" />
                                        <asp:Parameter Name="maximumRows" Type="Int32" />
                                    </SelectParameters>
                                </owc:OwObjectDataSource>
                                <owc:OwComboBox ID="CommunityFieldOfActivitiesCbb" runat="server" DataSourceID="CommunityFieldOfActivitiesOds"
                                    SkinID="OwComboBox" SelectedValue='<%# Bind("CommunityFieldOfActivityID")%>'
                                    EmptyMessage="<%$OwR:CommunityFieldOfActivitiesSelect %>" DataTextField="Name"
                                    DataValueField="CommunityFieldOfActivityID">
                                </owc:OwComboBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="<%$OwR:CommunityFieldOfActivitiesSelect %>"
                                    ControlToValidate="CommunityFieldOfActivitiesCbb" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                      <%--  <tr>
                            <td>
                                <owc:OwR runat="server" OwText="IsDeleted" />
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%# Bind("IsDeleted") %>'
                                    SkinID="OwCheckBox" />
                            </td>
                        </tr>--%>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <owc:OwButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    SkinID="OwButtonAdmin" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </owc:OwButton>
                                <owc:OwButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    SkinID="OwButtonAdmin" CommandName="Cancel">
                                </owc:OwButton>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="CommunityProfilesInFieldOfActivitiesOds" runat="server"
    EnablePaging="True" SelectCountMethod="OwGetByDynamicCount" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenCommunityProfilesInFieldOfActivitiesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenCommunityProfilesInFieldOfActivitiesBLL"
    UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="communityProfilesInFieldOfActivitiesID" Type="Int64" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="communityProfilesInFieldOfActivitiesID" Type="Int64" />
        <asp:Parameter Name="communityProfileDetailID" Type="Int64" />
        <asp:Parameter Name="communityFieldOfActivityID" Type="Int64" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
    </InsertParameters>
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="" />
        <asp:Parameter Name="communityProfileDetailID" Type="Int64" />
        <asp:Parameter Name="communityFieldOfActivityID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
